package com.njust.utils;

import com.github.pagehelper.PageInfo;
import com.njust.vo.PageResultVo;
import com.njust.vo.ResultVO;

/**
 * Description:
 *  用来将PageHelper中的元素封装成ResultVo中。
 * Create by User: HorseChestnut
 * Date: 2018-01-06
 */
public class PageUtils {
    public static void pageUtil(PageInfo info, PageResultVo resultVO){
        resultVO.setTotalNum(info.getTotal());
        resultVO.setPageNum(info.getPageNum());
        resultVO.setPages(info.getPages());
        resultVO.setPageSize(info.getPageSize());
        resultVO.setSize(info.getSize());
    }
}
